WLAN_RADIO_STATE (wlanapi)
Last changed: Richard von Mallesch-124.171.28.244

.
Summary
TODO - a short description

C# Signature:

[DllImport("wlanapi.dll", SetLastError=true)]
static extern TODO WLAN_RADIO_STATE(TODO);

VB Signature:

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

    Private Structure WLAN_RADIO_STATE
    Public dwNumberOfPhys As UInt32
    Public PhyRadioState As WLAN_PHY_RADIO_STATE()

    Public Sub New(ppData As IntPtr)
        ' The first 4 bytes are the number of WLAN_PHY_RADIO_STATE structures.
        dwNumberOfPhys = Marshal.ReadInt32(ppData, 0)

        ' Construct the array of WLAN_PHY_RADIO_STATE structures.
        PhyRadioState = New WLAN_PHY_RADIO_STATE(dwNumberOfPhys - 1) {}

        For i As Integer = 0 To dwNumberOfPhys - 1
        ' The offset of the array of structures is 4 bytes past the beginning.
        ' Then, take the index and multiply it by the number of bytes in the
        ' structure. The length of the WLAN_PHY_RADIO_STATE structure is 12 bytes
        Dim pPhyList As New IntPtr(ppData.ToInt32() + (i * 12) + 4)

        ' Construct the WLAN_PHY_RADIO_STATE structure, marshal the unmanaged
        ' structure into it, then copy it to the array of structures.
        PhyRadioState(i) = DirectCast(Marshal.PtrToStructure(pPhyList, GetType(WLAN_PHY_RADIO_STATE)), WLAN_PHY_RADIO_STATE)
        Next
    End Sub
    End Structure

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation